<%= form_for record,
        :remote => true,
        :url => create_record_customer_url,
        :html => {
          :id => :new_record_form
        } do |f|  %>   
  <div class="form">
    <%= f.text_area :content, :class => :grid_11 %>
    <%= f.hidden_field :customer_id %>
  </div>
  <div class="tools">
    <%= link_to_function "添加该记录","$('#new_record_form').submit()", :class => :button %>        
  </div>
<% end %>
<script type="text/javascript" charset="utf-8">
  $('#new_record_form .button').click(function() {
    $(this).replaceWith("<%= j loading_image_tag %>")
  })
</script>
    